<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: Cropping</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__crop.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Cropping<div class="ingroups"><a class="el" href="group__util.html">Utilities Library (jetson-utils)</a> &raquo; <a class="el" href="group__cuda.html">CUDA</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Crop an image to the specified region of interest (ROI).  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3d4c665ec3f71800a5099d4a438563d9"><td class="memItemLeft" align="right" valign="top">cudaError_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__crop.html#ga3d4c665ec3f71800a5099d4a438563d9">cudaCrop</a> (uint8_t *input, uint8_t *output, const int4 &amp;roi, size_t inputWidth, size_t inputHeight)</td></tr>
<tr class="memdesc:ga3d4c665ec3f71800a5099d4a438563d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Crop a uint8 grayscale image to the specified region of interest (ROI).  <a href="#ga3d4c665ec3f71800a5099d4a438563d9">More...</a><br /></td></tr>
<tr class="separator:ga3d4c665ec3f71800a5099d4a438563d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga867017394024f011012b6244115b07e7"><td class="memItemLeft" align="right" valign="top">cudaError_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__crop.html#ga867017394024f011012b6244115b07e7">cudaCrop</a> (float *input, float *output, const int4 &amp;roi, size_t inputWidth, size_t inputHeight)</td></tr>
<tr class="memdesc:ga867017394024f011012b6244115b07e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Crop a floating-point grayscale image to the specified region of interest (ROI).  <a href="#ga867017394024f011012b6244115b07e7">More...</a><br /></td></tr>
<tr class="separator:ga867017394024f011012b6244115b07e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga216a46406c3367ec40a531909c226090"><td class="memItemLeft" align="right" valign="top">cudaError_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__crop.html#ga216a46406c3367ec40a531909c226090">cudaCrop</a> (uchar3 *input, uchar3 *output, const int4 &amp;roi, size_t inputWidth, size_t inputHeight)</td></tr>
<tr class="memdesc:ga216a46406c3367ec40a531909c226090"><td class="mdescLeft">&#160;</td><td class="mdescRight">Crop a uchar3 RGB/BGR image to the specified region of interest (ROI).  <a href="#ga216a46406c3367ec40a531909c226090">More...</a><br /></td></tr>
<tr class="separator:ga216a46406c3367ec40a531909c226090"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0e1e3d31e5622b599a6cd0eb138065d5"><td class="memItemLeft" align="right" valign="top">cudaError_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__crop.html#ga0e1e3d31e5622b599a6cd0eb138065d5">cudaCrop</a> (uchar4 *input, uchar4 *output, const int4 &amp;roi, size_t inputWidth, size_t inputHeight)</td></tr>
<tr class="memdesc:ga0e1e3d31e5622b599a6cd0eb138065d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Crop a uchar4 RGBA/BGRA image to the specified region of interest (ROI).  <a href="#ga0e1e3d31e5622b599a6cd0eb138065d5">More...</a><br /></td></tr>
<tr class="separator:ga0e1e3d31e5622b599a6cd0eb138065d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafa47a7df3f3f99e83e86cc6e780b9997"><td class="memItemLeft" align="right" valign="top">cudaError_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__crop.html#gafa47a7df3f3f99e83e86cc6e780b9997">cudaCrop</a> (float3 *input, float3 *output, const int4 &amp;roi, size_t inputWidth, size_t inputHeight)</td></tr>
<tr class="memdesc:gafa47a7df3f3f99e83e86cc6e780b9997"><td class="mdescLeft">&#160;</td><td class="mdescRight">Crop a float3 RGB/BGR image to the specified region of interest (ROI).  <a href="#gafa47a7df3f3f99e83e86cc6e780b9997">More...</a><br /></td></tr>
<tr class="separator:gafa47a7df3f3f99e83e86cc6e780b9997"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4df9ac38e02cbab74f471c5f324980a2"><td class="memItemLeft" align="right" valign="top">cudaError_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__crop.html#ga4df9ac38e02cbab74f471c5f324980a2">cudaCrop</a> (float4 *input, float4 *output, const int4 &amp;roi, size_t inputWidth, size_t inputHeight)</td></tr>
<tr class="memdesc:ga4df9ac38e02cbab74f471c5f324980a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Crop a float4 RGBA/BGRA image to the specified region of interest (ROI).  <a href="#ga4df9ac38e02cbab74f471c5f324980a2">More...</a><br /></td></tr>
<tr class="separator:ga4df9ac38e02cbab74f471c5f324980a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacfbd48aaa32289a1322da72feb5311b8"><td class="memItemLeft" align="right" valign="top">cudaError_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__crop.html#gacfbd48aaa32289a1322da72feb5311b8">cudaCrop</a> (void *input, void *output, const int4 &amp;roi, size_t inputWidth, size_t inputHeight, <a class="el" href="group__imageFormat.html#ga931c48e08f361637d093355d64583406">imageFormat</a> format)</td></tr>
<tr class="memdesc:gacfbd48aaa32289a1322da72feb5311b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Crop a float4 RGBA/BGRA image to the specified region of interest (ROI).  <a href="#gacfbd48aaa32289a1322da72feb5311b8">More...</a><br /></td></tr>
<tr class="separator:gacfbd48aaa32289a1322da72feb5311b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Crop an image to the specified region of interest (ROI). </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga3d4c665ec3f71800a5099d4a438563d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d4c665ec3f71800a5099d4a438563d9">&#9670;&nbsp;</a></span>cudaCrop() <span class="overload">[1/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cudaError_t cudaCrop </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int4 &amp;&#160;</td>
          <td class="paramname"><em>roi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputHeight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Crop a uint8 grayscale image to the specified region of interest (ROI). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Pointer to the input image in CUDA memory. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Pointer to the output image in CUDA memory. The output image should have the same dimensions as the ROI. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">roi</td><td>The region of interest from the input image that will be copied to the output image. This <code>int4</code> vector forms a crop rectangle as follows:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li><code>roi.x -&gt; left</code></li>
<li><code>roi.y -&gt; top</code></li>
<li><code>roi.z -&gt; right</code></li>
<li><code>roi.w -&gt; bottom</code></li>
</ul>
<p>The ROI coordinates must not be negative, otherwise an error will be returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputWidth</td><td>width of the input image (in pixels) </td></tr>
    <tr><td class="paramname">inputWidth</td><td>height of the input image (in pixels) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga867017394024f011012b6244115b07e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga867017394024f011012b6244115b07e7">&#9670;&nbsp;</a></span>cudaCrop() <span class="overload">[2/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cudaError_t cudaCrop </td>
          <td>(</td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int4 &amp;&#160;</td>
          <td class="paramname"><em>roi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputHeight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Crop a floating-point grayscale image to the specified region of interest (ROI). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Pointer to the input image in CUDA memory. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Pointer to the output image in CUDA memory. The output image should have the same dimensions as the ROI. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">roi</td><td>The region of interest from the input image that will be copied to the output image. This <code>int4</code> vector forms a crop rectangle as follows:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li><code>roi.x -&gt; left</code></li>
<li><code>roi.y -&gt; top</code></li>
<li><code>roi.z -&gt; right</code></li>
<li><code>roi.w -&gt; bottom</code></li>
</ul>
<p>The ROI coordinates must not be negative, otherwise an error will be returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputWidth</td><td>width of the input image (in pixels) </td></tr>
    <tr><td class="paramname">inputWidth</td><td>height of the input image (in pixels) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga216a46406c3367ec40a531909c226090"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga216a46406c3367ec40a531909c226090">&#9670;&nbsp;</a></span>cudaCrop() <span class="overload">[3/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cudaError_t cudaCrop </td>
          <td>(</td>
          <td class="paramtype">uchar3 *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uchar3 *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int4 &amp;&#160;</td>
          <td class="paramname"><em>roi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputHeight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Crop a uchar3 RGB/BGR image to the specified region of interest (ROI). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Pointer to the input image in CUDA memory. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Pointer to the output image in CUDA memory. The output image should have the same dimensions as the ROI. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">roi</td><td>The region of interest from the input image that will be copied to the output image. This <code>int4</code> vector forms a crop rectangle as follows:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li><code>roi.x -&gt; left</code></li>
<li><code>roi.y -&gt; top</code></li>
<li><code>roi.z -&gt; right</code></li>
<li><code>roi.w -&gt; bottom</code></li>
</ul>
<p>The ROI coordinates must not be negative, otherwise an error will be returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputWidth</td><td>width of the input image (in pixels) </td></tr>
    <tr><td class="paramname">inputWidth</td><td>height of the input image (in pixels) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga0e1e3d31e5622b599a6cd0eb138065d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0e1e3d31e5622b599a6cd0eb138065d5">&#9670;&nbsp;</a></span>cudaCrop() <span class="overload">[4/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cudaError_t cudaCrop </td>
          <td>(</td>
          <td class="paramtype">uchar4 *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uchar4 *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int4 &amp;&#160;</td>
          <td class="paramname"><em>roi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputHeight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Crop a uchar4 RGBA/BGRA image to the specified region of interest (ROI). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Pointer to the input image in CUDA memory. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Pointer to the output image in CUDA memory. The output image should have the same dimensions as the ROI. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">roi</td><td>The region of interest from the input image that will be copied to the output image. This <code>int4</code> vector forms a crop rectangle as follows:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li><code>roi.x -&gt; left</code></li>
<li><code>roi.y -&gt; top</code></li>
<li><code>roi.z -&gt; right</code></li>
<li><code>roi.w -&gt; bottom</code></li>
</ul>
<p>The ROI coordinates must not be negative, otherwise an error will be returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputWidth</td><td>width of the input image (in pixels) </td></tr>
    <tr><td class="paramname">inputWidth</td><td>height of the input image (in pixels) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gafa47a7df3f3f99e83e86cc6e780b9997"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafa47a7df3f3f99e83e86cc6e780b9997">&#9670;&nbsp;</a></span>cudaCrop() <span class="overload">[5/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cudaError_t cudaCrop </td>
          <td>(</td>
          <td class="paramtype">float3 *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float3 *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int4 &amp;&#160;</td>
          <td class="paramname"><em>roi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputHeight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Crop a float3 RGB/BGR image to the specified region of interest (ROI). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Pointer to the input image in CUDA memory. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Pointer to the output image in CUDA memory. The output image should have the same dimensions as the ROI. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">roi</td><td>The region of interest from the input image that will be copied to the output image. This <code>int4</code> vector forms a crop rectangle as follows:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li><code>roi.x -&gt; left</code></li>
<li><code>roi.y -&gt; top</code></li>
<li><code>roi.z -&gt; right</code></li>
<li><code>roi.w -&gt; bottom</code></li>
</ul>
<p>The ROI coordinates must not be negative, otherwise an error will be returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputWidth</td><td>width of the input image (in pixels) </td></tr>
    <tr><td class="paramname">inputWidth</td><td>height of the input image (in pixels) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga4df9ac38e02cbab74f471c5f324980a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4df9ac38e02cbab74f471c5f324980a2">&#9670;&nbsp;</a></span>cudaCrop() <span class="overload">[6/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cudaError_t cudaCrop </td>
          <td>(</td>
          <td class="paramtype">float4 *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float4 *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int4 &amp;&#160;</td>
          <td class="paramname"><em>roi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputHeight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Crop a float4 RGBA/BGRA image to the specified region of interest (ROI). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Pointer to the input image in CUDA memory. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Pointer to the output image in CUDA memory. The output image should have the same dimensions as the ROI. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">roi</td><td>The region of interest from the input image that will be copied to the output image. This <code>int4</code> vector forms a crop rectangle as follows:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li><code>roi.x -&gt; left</code></li>
<li><code>roi.y -&gt; top</code></li>
<li><code>roi.z -&gt; right</code></li>
<li><code>roi.w -&gt; bottom</code></li>
</ul>
<p>The ROI coordinates must not be negative, otherwise an error will be returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputWidth</td><td>width of the input image (in pixels) </td></tr>
    <tr><td class="paramname">inputWidth</td><td>height of the input image (in pixels) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gacfbd48aaa32289a1322da72feb5311b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacfbd48aaa32289a1322da72feb5311b8">&#9670;&nbsp;</a></span>cudaCrop() <span class="overload">[7/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cudaError_t cudaCrop </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int4 &amp;&#160;</td>
          <td class="paramname"><em>roi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>inputHeight</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__imageFormat.html#ga931c48e08f361637d093355d64583406">imageFormat</a>&#160;</td>
          <td class="paramname"><em>format</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Crop a float4 RGBA/BGRA image to the specified region of interest (ROI). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Pointer to the input image in CUDA memory. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Pointer to the output image in CUDA memory. The output image should have the same dimensions as the ROI. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">roi</td><td>The region of interest from the input image that will be copied to the output image. This <code>int4</code> vector forms a crop rectangle as follows:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li><code>roi.x -&gt; left</code></li>
<li><code>roi.y -&gt; top</code></li>
<li><code>roi.z -&gt; right</code></li>
<li><code>roi.w -&gt; bottom</code></li>
</ul>
<p>The ROI coordinates must not be negative, otherwise an error will be returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputWidth</td><td>width of the input image (in pixels) </td></tr>
    <tr><td class="paramname">inputWidth</td><td>height of the input image (in pixels) </td></tr>
    <tr><td class="paramname">format</td><td>format of the image - valid formats are gray8, gray32f, rgb8/bgr8, rgba8/bgra8, rgb32f/bgr32f, and rgba32f/bgra32f. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Tue Jul 14 2020 21:59:34 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
